Exploratory Plots for 2017-2018 Acoustic/Fish Data
Purpose To explore the Acoustic data gathered in 2017 and 2018 to expose important trends between sites, diurnal patterns, fish abundance, lunar phase, and coral reef acoustics.
Combined Model All variables are matched to the files that were used for Fish call counts (3:00, 9:00, 15:00, 21:00)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Running basic regressions linking the explanatory to the response at their lowest levels and combined to see how different sites/ hours change the regression - SPL
Linear Model outputs below each
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = Snap.HF17)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.8309 -1.9842 0.2062 1.8451 13.3944
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.053e+02 6.541e-01 160.99 <2e-16 ***
## Snaps 7.227e-03 4.475e-04 16.15 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.807 on 10163 degrees of freedom
## Multiple R-squared: 0.02502, Adjusted R-squared: 0.02493
## F-statistic: 260.8 on 1 and 10163 DF, p-value: < 2.2e-16
2017 Snap data, snaps significant.
When you break it down by site, site 32 has the opposite relationship with high frequency and snaps.
2017 Snap/HF SPL Site Breakdown
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s17s5)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.0817 -2.1540 0.4371 1.9805 7.0937
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 87.830664 1.873329 46.88 <2e-16 ***
## Snaps 0.018381 0.001277 14.39 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.483 on 2101 degrees of freedom
## Multiple R-squared: 0.08971, Adjusted R-squared: 0.08928
## F-statistic: 207.1 on 1 and 2101 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s17s8)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.3374 -1.3945 0.1363 1.4230 9.4265
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.185e+01 1.270e+00 56.59 <2e-16 ***
## Snaps 3.314e-02 9.084e-04 36.48 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.117 on 1831 degrees of freedom
## Multiple R-squared: 0.4209, Adjusted R-squared: 0.4206
## F-statistic: 1331 on 1 and 1831 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s17s35)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.9213 -1.7565 -0.0424 1.6512 10.3407
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 71.282701 1.451690 49.10 <2e-16 ***
## Snaps 0.029598 0.000995 29.75 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.573 on 2205 degrees of freedom
## Multiple R-squared: 0.2864, Adjusted R-squared: 0.2861
## F-statistic: 884.9 on 1 and 2205 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s17s40)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.1902 -1.2312 0.0344 1.2186 9.3897
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.644e+01 1.044e+00 73.19 <2e-16 ***
## Snaps 2.679e-02 7.062e-04 37.93 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.736 on 1862 degrees of freedom
## Multiple R-squared: 0.4359, Adjusted R-squared: 0.4356
## F-statistic: 1439 on 1 and 1862 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s17s32)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.936 -1.084 0.114 1.063 7.102
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 137.43721 0.89844 152.97 <2e-16 ***
## Snaps -0.01414 0.00060 -23.56 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.532 on 2156 degrees of freedom
## Multiple R-squared: 0.2047, Adjusted R-squared: 0.2044
## F-statistic: 555 on 1 and 2156 DF, p-value: < 2.2e-16
2018 Snap/HF SPL
Removing outliers
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = Snap.HF18)
##
## Residuals:
## Min 1Q Median 3Q Max
## -9.4682 -1.9696 0.0058 2.4042 30.2074
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 8.617e+01 8.999e-01 95.75 <2e-16 ***
## Snaps 2.269e-02 6.168e-04 36.78 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.142 on 5823 degrees of freedom
## Multiple R-squared: 0.1886, Adjusted R-squared: 0.1884
## F-statistic: 1353 on 1 and 5823 DF, p-value: < 2.2e-16
2018 Snap data with outliers removed. Snaps significant.
When split by sight, site 32 has a flat relationship.
2018 Snap/HF SPL Site Breakdown
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s18s5)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.0981 -1.7519 0.0868 1.8483 7.3155
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 65.228548 2.209305 29.52 <2e-16 ***
## Snaps 0.034773 0.001507 23.07 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.358 on 1163 degrees of freedom
## Multiple R-squared: 0.3141, Adjusted R-squared: 0.3135
## F-statistic: 532.5 on 1 and 1163 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s18s8)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.8360 -1.2952 0.0422 1.3418 5.6060
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.663e+01 1.432e+00 46.52 <2e-16 ***
## Snaps 3.654e-02 9.848e-04 37.11 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.872 on 1163 degrees of freedom
## Multiple R-squared: 0.5421, Adjusted R-squared: 0.5417
## F-statistic: 1377 on 1 and 1163 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s18s35)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.907 -1.162 0.056 1.130 7.400
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 8.354e+01 1.029e+00 81.18 <2e-16 ***
## Snaps 2.627e-02 6.956e-04 37.77 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.721 on 1160 degrees of freedom
## Multiple R-squared: 0.5515, Adjusted R-squared: 0.5511
## F-statistic: 1426 on 1 and 1160 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s18s40)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.0382 -1.5465 -0.0117 1.4352 9.5694
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 71.758279 1.518229 47.26 <2e-16 ***
## Snaps 0.031320 0.001047 29.91 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.057 on 1163 degrees of freedom
## Multiple R-squared: 0.4348, Adjusted R-squared: 0.4343
## F-statistic: 894.8 on 1 and 1163 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s18s32)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.018 -1.897 0.075 1.698 5.913
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.203e+02 1.488e+00 80.885 <2e-16 ***
## Snaps 3.421e-04 1.028e-03 0.333 0.739
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.055 on 1163 degrees of freedom
## Multiple R-squared: 9.519e-05, Adjusted R-squared: -0.0007646
## F-statistic: 0.1107 on 1 and 1163 DF, p-value: 0.7394
Mid Frequency
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = AC.DF1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.248 -2.267 -0.871 1.597 19.211
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.047e+02 3.888e-01 269.163 < 2e-16 ***
## Tot_Knocks 1.744e-02 4.465e-03 3.906 0.000129 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.519 on 198 degrees of freedom
## Multiple R-squared: 0.07154, Adjusted R-squared: 0.06685
## F-statistic: 15.26 on 1 and 198 DF, p-value: 0.0001287
2017-2018 data w/200 samples. 1st plot splits by site and second by hour to show any patterns before I break them down individually.
Breakdown by Site
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s5)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.4846 -2.3049 0.1011 1.9482 6.0310
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.065e+02 1.106e+00 96.290 <2e-16 ***
## Tot_Knocks 5.551e-04 8.256e-03 0.067 0.947
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.034 on 38 degrees of freedom
## Multiple R-squared: 0.0001189, Adjusted R-squared: -0.02619
## F-statistic: 0.00452 on 1 and 38 DF, p-value: 0.9467
Site 5, knocks not significant.
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s35)
##
## Residuals:
## Min 1Q Median 3Q Max
## -10.1201 -3.6626 0.4059 4.2686 9.1758
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 105.01636 1.19662 87.761 <2e-16 ***
## Tot_Knocks 0.03231 0.01218 2.653 0.0116 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.804 on 38 degrees of freedom
## Multiple R-squared: 0.1563, Adjusted R-squared: 0.1341
## F-statistic: 7.039 on 1 and 38 DF, p-value: 0.01157
Site 35, knocks significant.
Removing 2 outliers > 150
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s35E)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.6933 -3.4563 0.5509 3.7326 5.9745
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 103.65392 1.45143 71.415 <2e-16 ***
## Tot_Knocks 0.06400 0.02366 2.705 0.0108 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.032 on 32 degrees of freedom
## Multiple R-squared: 0.1861, Adjusted R-squared: 0.1607
## F-statistic: 7.319 on 1 and 32 DF, p-value: 0.01085
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s8)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.5526 -1.5016 0.6098 1.8588 6.6098
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 105.497101 0.700474 150.61 <2e-16 ***
## Tot_Knocks -0.006653 0.009929 -0.67 0.507
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.727 on 38 degrees of freedom
## Multiple R-squared: 0.01168, Adjusted R-squared: -0.01433
## F-statistic: 0.449 on 1 and 38 DF, p-value: 0.5068
Site 8, knocks not significant. Negative relationship… thats interesting.
Removing Outlier
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s8E)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.3549 -1.7770 -0.0747 1.6182 6.3206
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 106.89195 0.84585 126.372 <2e-16 ***
## Tot_Knocks -0.03653 0.01478 -2.473 0.0181 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.542 on 37 degrees of freedom
## Multiple R-squared: 0.1418, Adjusted R-squared: 0.1186
## F-statistic: 6.113 on 1 and 37 DF, p-value: 0.01814
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s40)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2090 -0.9792 -0.3831 0.7009 4.7409
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.041e+02 4.407e-01 236.176 <2e-16 ***
## Tot_Knocks 6.514e-03 8.094e-03 0.805 0.426
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.554 on 38 degrees of freedom
## Multiple R-squared: 0.01676, Adjusted R-squared: -0.009116
## F-statistic: 0.6477 on 1 and 38 DF, p-value: 0.4259
Site 40, knocks not significant.
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s32)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0442 -1.9728 -0.7078 0.0613 18.4340
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 103.79253 0.92602 112.084 <2e-16 ***
## Tot_Knocks 0.04784 0.01903 2.514 0.0163 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.783 on 38 degrees of freedom
## Multiple R-squared: 0.1426, Adjusted R-squared: 0.12
## F-statistic: 6.321 on 1 and 38 DF, p-value: 0.01629
Site 32, knocks significant.
Breakdown by Hour
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = h3)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.8821 -2.3813 -0.5447 2.0264 6.8553
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.043e+02 7.055e-01 147.893 <2e-16 ***
## Tot_Knocks 5.296e-03 7.304e-03 0.725 0.472
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.121 on 48 degrees of freedom
## Multiple R-squared: 0.01083, Adjusted R-squared: -0.009773
## F-statistic: 0.5258 on 1 and 48 DF, p-value: 0.4719
3AM, knocks not significant.
Splitting by site to see if any site has a relationship
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = h9)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.3144 -1.6662 -0.4952 0.7818 8.0555
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 102.90908 0.61924 166.186 < 2e-16 ***
## Tot_Knocks 0.05274 0.00653 8.076 1.69e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.703 on 48 degrees of freedom
## Multiple R-squared: 0.5761, Adjusted R-squared: 0.5672
## F-statistic: 65.22 on 1 and 48 DF, p-value: 1.69e-10
9AM, knocks significant
Splitting by site
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = h15)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0816 -2.0625 -0.9435 1.2227 7.1127
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 105.697228 0.669185 157.949 <2e-16 ***
## Tot_Knocks -0.006816 0.011700 -0.583 0.563
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.128 on 48 degrees of freedom
## Multiple R-squared: 0.007021, Adjusted R-squared: -0.01367
## F-statistic: 0.3394 on 1 and 48 DF, p-value: 0.5629
3PM, knocks not significant
Splitting by site
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = h21)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.987 -2.505 -0.915 1.457 18.595
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.060e+02 9.217e-01 114.979 <2e-16 ***
## Tot_Knocks 4.355e-03 9.860e-03 0.442 0.661
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.91 on 48 degrees of freedom
## Multiple R-squared: 0.004048, Adjusted R-squared: -0.0167
## F-statistic: 0.1951 on 1 and 48 DF, p-value: 0.6607
9PM, knocks not significant.
Splitting by site.
3 AM, long calls don’t seem to explain a great deal of the relationship at any site
9 AM, long calls don’t seem to explain the relationship at any site
3 PM, long calls don’t seem to explain the relationship
9 PM, long calls don’t seem to explain the relationship
3 AM, Extremely low herbivory at all sites. No relationship
Again, extremely low herbivory, no relationship.
Higher herbivory. Seems like there is a relationship at site 40, 8, and 35.
Higher herbivory here as well, although there is no positive relationship at any site.
Summary Knocks significantly explained SPLMF at sites 35 and 32 and at 9AM.
Running basic regressions linking the wind to SPL at both HF and MF to see if wind speed is significantly affecting the sound
## Warning: Removed 1518 rows containing non-finite values (stat_smooth).
## Warning: Removed 1518 rows containing missing values (geom_point).
## Warning: Removed 1520 rows containing non-finite values (stat_smooth).
## Warning: Removed 1520 rows containing missing values (geom_point).
Wind doesn’t seem to impact SPL HF or MF in any particular direction. Although the wind range seems really small.
Running basic regressions linking the explanatory to the response at their lowest levels and combined to see how different sites/ hours change the regression - SPL
Linear Model outputs below each
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = Snap.HF17C)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.8309 -1.9842 0.2062 1.8451 13.3944
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.988e-16 2.784e-02 0.00 1
## Snaps 7.227e-03 4.475e-04 16.15 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.807 on 10163 degrees of freedom
## Multiple R-squared: 0.02502, Adjusted R-squared: 0.02493
## F-statistic: 260.8 on 1 and 10163 DF, p-value: < 2.2e-16
2017 Snap data, snaps significant.
Mid Frequency
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = AC.DF1C)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.248 -2.267 -0.871 1.597 19.211
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.231e-15 2.488e-01 0.000 1.000000
## Tot_Knocks 1.744e-02 4.465e-03 3.906 0.000129 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.519 on 198 degrees of freedom
## Multiple R-squared: 0.07154, Adjusted R-squared: 0.06685
## F-statistic: 15.26 on 1 and 198 DF, p-value: 0.0001287
2017-2018 data w/200 samples. 1st plot splits by site and second by hour to show any patterns before I break them down individually.
#subsetting only lm variables
AC.DF1Co <- subset(AC.DF1C, select = c(SPL_Midrange, Tot_Knocks, Num_L_calls, Num_Herbivory, Site, Hour))
vif(AC.DF1Co)
## Variables VIF
## 1 SPL_Midrange 1.233794
## 2 Tot_Knocks 1.602587
## 3 Num_L_calls 1.274945
## 4 Num_Herbivory 1.363614
## 5 Site 1.161708
## 6 Hour 1.134078
#no colinnearity found between explanatory variables
#ggpairs(AC.DF1Co)
All values are near 1, values of 4 or 5 would be moderate. 1 = no collinearity. I think this means that we have no collinearity between my explanatory variables
Breakdown by Site
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s5c)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.4846 -2.3049 0.1011 1.9482 6.0310
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.7260602 0.6538399 1.110 0.274
## Tot_Knocks 0.0005551 0.0082561 0.067 0.947
##
## Residual standard error: 3.034 on 38 degrees of freedom
## Multiple R-squared: 0.0001189, Adjusted R-squared: -0.02619
## F-statistic: 0.00452 on 1 and 38 DF, p-value: 0.9467
Site 5, knocks not significant.
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s35c)
##
## Residuals:
## Min 1Q Median 3Q Max
## -10.1201 -3.6626 0.4059 4.2686 9.1758
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.35437 0.76752 1.765 0.0857 .
## Tot_Knocks 0.03231 0.01218 2.653 0.0116 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.804 on 38 degrees of freedom
## Multiple R-squared: 0.1563, Adjusted R-squared: 0.1341
## F-statistic: 7.039 on 1 and 38 DF, p-value: 0.01157
Site 35, knocks significant.
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s8c)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.5526 -1.5016 0.6098 1.8588 6.6098
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.772249 0.445578 -1.733 0.0912 .
## Tot_Knocks -0.006653 0.009929 -0.670 0.5068
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.727 on 38 degrees of freedom
## Multiple R-squared: 0.01168, Adjusted R-squared: -0.01433
## F-statistic: 0.449 on 1 and 38 DF, p-value: 0.5068
Site 8, knocks not significant. Negative relationship… thats interesting.
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s40c)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2090 -0.9792 -0.3831 0.7009 4.7409
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.308449 0.302106 -4.331 0.000104 ***
## Tot_Knocks 0.006514 0.008094 0.805 0.425944
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.554 on 38 degrees of freedom
## Multiple R-squared: 0.01676, Adjusted R-squared: -0.009116
## F-statistic: 0.6477 on 1 and 38 DF, p-value: 0.4259
Site 40, knocks not significant.
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s32c)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0442 -1.9728 -0.7078 0.0613 18.4340
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.16979 0.82383 1.420 0.1638
## Tot_Knocks 0.04784 0.01903 2.514 0.0163 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.783 on 38 degrees of freedom
## Multiple R-squared: 0.1426, Adjusted R-squared: 0.12
## F-statistic: 6.321 on 1 and 38 DF, p-value: 0.01629
Site 32, knocks significant.
Acoustics Breakdown All acoustic metrics (SPL and ACI) are broken down into 2 frequency bands: High Frequency (Frequencies between 1 kHz - 22 kHz) and Mid Frequency (Frequencies between 160 Hz and 1 kHz)
Note 2017 had a 10 minute duty cycle with 5 minutes recording while 2018 had a 15 minute duty cycle with 5 minutes recording, so the number of files averages differs between years
Plots of high frequency patterns, notice diurnal patterns with highest SPL at night and lowest during the day (this is shown in the literature), also notice the clear splits by site.
Total Deployment, 2017
Site Breakdown Total Deployment 2017
Total Deployment, 2018
Site Breakdown Total Deployment 2018
Diurnal Pattern, 2017
Diurnal Pattern Site Breakdown, 2017
Diurnal Pattern, 2018
Diurnal Pattern Site Breakdown, 2018
Note site 35 seems to have switched position between 2017 and 2018 but all of the other sites seem to be staying more or less in the same spot
Running this to see if snaps follow the same trends as SPL HF at all sites
Plots of mid frequency patterns, notice opposite diurnal patterns with highest SPL during the day and lowest at night, also notice the clear splits by site.
2017 All Sites
Site Breakdown, 2017
2018 All Sites
Site Breakdown, 2018
All Sites, 2017
Site Breakdown, 2017
All Sites, 2018
Site Breakdown, 2018
Total Deployment All Sites, 2017
Total Deployment Site Breakdown, 2017
Total Deployment All Sites, 2018
Total Deployment Site Breakdown, 2018
Diurnal Pattern All Sites, 2017
Diurnal Pattern Site Breakdown, 2017
Diurnal Patterns All Sites, 2018
Diurnal Pattern Site Breakdown, 2018
Diurnal Pattern, Only using 4 time point subset - 2017
While I know these averages aren’t accurate - SPL is log scaled, I just wanted to see the breakdown
Diurnal Pattern, Only using 4 time point subset - 2018
While I know these averages aren’t accurate - SPL is log scaled, I just wanted to see the breakdown
Preliminary Models Looking into the relationships between biogenic sounds (Knocks/Calls and Snaps) and their frequency spectra (MF SPL/HF SPL) respectively. ##Testing for Normality
shapiro.test(AC.DF1$SPL_Midrange)
##
## Shapiro-Wilk normality test
##
## data: AC.DF1$SPL_Midrange
## W = 0.89502, p-value = 1.225e-10
qqnorm(AC.DF1$SPL_Midrange)
ks.test(SPLHF.long$SPL_HF, "pnorm", mean=mean(SPLHF.long$SPL_HF), sd=sd(SPLHF.long$SPL_HF))
## Warning in ks.test(SPLHF.long$SPL_HF, "pnorm", mean =
## mean(SPLHF.long$SPL_HF), : ties should not be present for the Kolmogorov-
## Smirnov test
##
## One-sample Kolmogorov-Smirnov test
##
## data: SPLHF.long$SPL_HF
## D = 0.027859, p-value = 5.618e-12
## alternative hypothesis: two-sided
ks.test(SPLMF.long$SPL_MF, "pnorm", mean=mean(SPLMF.long$SPL_MF), sd=sd(SPLMF.long$SPL_MF))
##
## One-sample Kolmogorov-Smirnov test
##
## data: SPLMF.long$SPL_MF
## D = 0.089921, p-value < 2.2e-16
## alternative hypothesis: two-sided
gamma_test(AC.DF1$SPL_Midrange)
##
## Test of fit for the Gamma distribution
##
## data: AC.DF1$SPL_Midrange
## V = 9.8936, p-value = 2.637e-12
weibull_test(AC.DF1$SPL_Midrange)
##
## Test for the Weibull distribution
##
## data: AC.DF1$SPL_Midrange
## p-value < 2.2e-16
gamma_test(AC.DF1$SPL_HF)
##
## Test of fit for the Gamma distribution
##
## data: AC.DF1$SPL_HF
## V = 0.16773, p-value = 0.9056
weibull_test(AC.DF1$SPL_HF)
##
## Test for the Weibull distribution
##
## data: AC.DF1$SPL_HF
## p-value < 2.2e-16
Don’t seem to have a normal distribution here… Working on testing different distributions. Not sure what the outputs on the gamma or weibull tests mean
Looking at Total Knocks only SPL MF ~ Tot_Knocks
#model 1 looking at Total Knocks only
gfit1 <- lm(SPL_Midrange ~ Tot_Knocks, data = AC.DF1Co)
#gfit1 <- glm(SPL_Midrange ~ Tot_Knocks, data = AC.DF1Co)
summary(gfit1)
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = AC.DF1Co)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.248 -2.267 -0.871 1.597 19.211
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.231e-15 2.488e-01 0.000 1.000000
## Tot_Knocks 1.744e-02 4.465e-03 3.906 0.000129 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.519 on 198 degrees of freedom
## Multiple R-squared: 0.07154, Adjusted R-squared: 0.06685
## F-statistic: 15.26 on 1 and 198 DF, p-value: 0.0001287
par(mfrow = c(2,2))
plot(gfit1)
#summary.glm(gfit1)$coefficients
Looking at Total Knocks and Number of Long Calls SPL MF ~ Tot_Knocks + Num_L_Calls
#model 1 looking at Total Knocks only
gfit2 <- lm(SPL_Midrange ~ Tot_Knocks + Num_L_calls, data = AC.DF1Co)
#gfit2 <- glm(SPL_Midrange ~ Tot_Knocks + Num_L_calls, data = AC.DF1Co, family = "gamma")
summary(gfit2)
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks + Num_L_calls, data = AC.DF1Co)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.248 -2.266 -0.872 1.597 19.210
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.231e-15 2.494e-01 0.000 1.000000
## Tot_Knocks 1.744e-02 4.501e-03 3.874 0.000145 ***
## Num_L_calls -2.603e-04 3.625e-02 -0.007 0.994278
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.528 on 197 degrees of freedom
## Multiple R-squared: 0.07154, Adjusted R-squared: 0.06212
## F-statistic: 7.59 on 2 and 197 DF, p-value: 0.0006677
par(mfrow = c(2,2))
plot(gfit2)
#summary.glm(gfit2)$coefficients
Looking at Total Knocks/Number of long calls/Herbivory SPL MF ~ Tot_Knocks + Num_L_Calls + Num_Herbivory
#model 1 looking at Total Knocks only
gfit3 <- glm(SPL_Midrange ~ Tot_Knocks + Num_L_calls + Num_Herbivory, data = AC.DF1, family = Gamma)
summary(gfit3)
##
## Call:
## glm(formula = SPL_Midrange ~ Tot_Knocks + Num_L_calls + Num_Herbivory,
## family = Gamma, data = AC.DF1)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -0.067662 -0.021756 -0.007807 0.015801 0.173266
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.565e-03 4.063e-05 235.409 < 2e-16 ***
## Tot_Knocks -1.539e-06 3.932e-07 -3.915 0.000125 ***
## Num_L_calls 3.309e-07 3.225e-06 0.103 0.918400
## Num_Herbivory -3.975e-06 2.555e-06 -1.556 0.121409
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Gamma family taken to be 0.00109656)
##
## Null deviance: 0.22855 on 199 degrees of freedom
## Residual deviance: 0.20923 on 196 degrees of freedom
## AIC: 1069.6
##
## Number of Fisher Scoring iterations: 3
par(mfrow = c(2,2))
plot(gfit3)
summary.glm(gfit3)$coefficients
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.564541e-03 4.062942e-05 235.4092305 2.341236e-242
## Tot_Knocks -1.539367e-06 3.932317e-07 -3.9146563 1.248754e-04
## Num_L_calls 3.308596e-07 3.225337e-06 0.1025814 9.184001e-01
## Num_Herbivory -3.975108e-06 2.555300e-06 -1.5556324 1.214087e-01
Looking at maximal model + site as a random effect SPL MF ~ Tot_Knocks + Num_L_Calls + Num_Herbivory + (1|Site)
#Adding site as a random effect
gfit4 <- lmer(SPL_Midrange ~ Tot_Knocks + Num_L_calls + Num_Herbivory + (1|Site), data = AC.DF1)
summary(gfit4)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: SPL_Midrange ~ Tot_Knocks + Num_L_calls + Num_Herbivory + (1 |
## Site)
## Data: AC.DF1
##
## REML criterion at convergence: 1081.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.3564 -0.6315 -0.1566 0.5338 5.5854
##
## Random effects:
## Groups Name Variance Std.Dev.
## Site (Intercept) 0.7626 0.8733
## Residual 11.7901 3.4337
## Number of obs: 200, groups: Site, 5
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 1.045e+02 6.079e-01 1.054e+01 171.841 < 2e-16 ***
## Tot_Knocks 1.672e-02 4.915e-03 1.398e+02 3.402 0.000874 ***
## Num_L_calls 2.053e-02 3.673e-02 1.936e+02 0.559 0.576782
## Num_Herbivory 4.361e-02 2.908e-02 1.959e+02 1.500 0.135264
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) Tt_Knc Nm_L_c
## Tot_Knocks -0.557
## Num_L_calls -0.310 0.005
## Num_Herbvry -0.172 0.091 -0.095
Looking at maximal model + site as a random effect + hour as a categorical (NOT ORDINAL) SPL MF ~ Tot_Knocks + Num_L_Calls + Num_Herbivory + Hour + (1|Site)
#Adding site as a random effect
gfit4t <- lmer(SPL_Midrange ~ Tot_Knocks + Num_L_calls + Num_Herbivory + Hour + (1|Site), data = AC.DF1)
summary(gfit4t)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: SPL_Midrange ~ Tot_Knocks + Num_L_calls + Num_Herbivory + Hour +
## (1 | Site)
## Data: AC.DF1
##
## REML criterion at convergence: 1068.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.0668 -0.6483 -0.2020 0.5426 5.6190
##
## Random effects:
## Groups Name Variance Std.Dev.
## Site (Intercept) 0.7892 0.8884
## Residual 11.3203 3.3646
## Number of obs: 200, groups: Site, 5
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 104.134221 0.736565 21.869370 141.378 < 2e-16 ***
## Tot_Knocks 0.015745 0.005015 145.351539 3.140 0.00205 **
## Num_L_calls 0.021353 0.038031 190.881996 0.561 0.57514
## Num_Herbivory 0.051821 0.031991 192.769163 1.620 0.10690
## Hour21 0.645737 0.747858 189.640451 0.863 0.38898
## Hour3 -0.680515 0.758471 189.653526 -0.897 0.37074
## Hour9 1.459642 0.756693 189.814402 1.929 0.05523 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) Tt_Knc Nm_L_c Nm_Hrb Hour21 Hour3
## Tot_Knocks -0.285
## Num_L_calls -0.208 0.036
## Num_Herbvry -0.382 -0.037 -0.097
## Hour21 -0.411 -0.232 -0.252 0.308
## Hour3 -0.497 -0.229 -0.047 0.409 0.572
## Hour9 -0.513 -0.222 0.021 0.402 0.555 0.603
Looking at maximal model + site as a random effect + hour as ORDINAL SPL MF ~ Tot_Knocks + Num_L_Calls + Num_Herbivory + Hour + (1|Site)
#making Hour ordinal
AC.DF1Co$Hour_factor <- factor (AC.DF1$Hour, order = TRUE, levels = c("3", "9", "15", "21"))
AC.DF1Co$Hour_factor
## [1] 15 15 15 15 15 21 21 21 21 21 3 3 3 3 3 9 9 9 9 9 15 15 15
## [24] 15 15 21 21 21 21 21 3 3 3 3 3 9 9 9 9 9 15 15 15 15 15 21
## [47] 21 21 21 21 3 3 3 3 3 9 9 9 9 9 15 15 15 15 15 21 21 21 21
## [70] 21 3 3 3 3 3 9 9 9 9 9 15 15 15 15 15 21 21 21 21 21 3 3
## [93] 3 3 3 9 9 9 9 9 15 15 15 15 15 21 21 21 21 21 3 3 3 3 3
## [116] 9 9 9 9 9 15 15 15 15 15 21 21 21 21 21 3 3 3 3 3 9 9 9
## [139] 9 9 15 15 15 15 15 21 21 21 21 21 3 3 3 3 3 9 9 9 9 9 15
## [162] 15 15 15 15 21 21 21 21 21 3 3 3 3 3 9 9 9 9 9 15 15 15 15
## [185] 15 21 21 21 21 21 3 3 3 3 3 9 9 9 9 9
## Levels: 3 < 9 < 15 < 21
#Adding site as a random effect
gfit4to <- lmer(SPL_Midrange ~ Tot_Knocks + Num_L_calls + Num_Herbivory + Hour_factor + (1|Site), data = AC.DF1Co)
summary(gfit4to)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## SPL_Midrange ~ Tot_Knocks + Num_L_calls + Num_Herbivory + Hour_factor +
## (1 | Site)
## Data: AC.DF1Co
##
## REML criterion at convergence: 1069.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.0668 -0.6483 -0.2020 0.5426 5.6190
##
## Random effects:
## Groups Name Variance Std.Dev.
## Site (Intercept) 0.7892 0.8884
## Residual 11.3203 3.3646
## Number of obs: 200, groups: Site, 5
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 4.595e-15 4.631e-01 3.779e+00 0.000 1.00000
## Tot_Knocks 1.575e-02 5.015e-03 1.454e+02 3.140 0.00205 **
## Num_L_calls 2.135e-02 3.803e-02 1.909e+02 0.561 0.57514
## Num_Herbivory 5.182e-02 3.199e-02 1.928e+02 1.620 0.10690
## Hour_factor.L 5.633e-01 5.066e-01 1.898e+02 1.112 0.26760
## Hour_factor.Q -7.472e-01 5.088e-01 1.895e+02 -1.469 0.14362
## Hour_factor.C 1.276e+00 5.218e-01 1.896e+02 2.445 0.01541 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) Tt_Knc Nm_L_c Nm_Hrb Hr_f.L Hr_f.Q
## Tot_Knocks 0.000
## Num_L_calls 0.000 0.036
## Num_Herbvry 0.000 -0.037 -0.097
## Hour_fctr.L 0.000 0.075 -0.210 -0.240
## Hour_fctr.Q 0.000 -0.176 -0.236 0.232 -0.017
## Hour_fctr.C 0.000 -0.216 -0.045 0.357 -0.098 0.118
Looking at maximal model + site as a random effect + hour as ORDINAL + interactions between hour and all explanatory SPL MF ~ Tot_Knocks + Num_L_Calls + Num_Herbivory + Hour + (1|Site)
#Adding site as a random effect
gfit5to <- lmer(SPL_Midrange ~ Tot_Knocks:Hour_factor + Num_L_calls:Hour_factor + Num_Herbivory:Hour_factor + (1|Site), data = AC.DF1Co)
summary(gfit5to)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula:
## SPL_Midrange ~ Tot_Knocks:Hour_factor + Num_L_calls:Hour_factor +
## Num_Herbivory:Hour_factor + (1 | Site)
## Data: AC.DF1Co
##
## REML criterion at convergence: 1078.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.7827 -0.6736 -0.1623 0.5578 6.0036
##
## Random effects:
## Groups Name Variance Std.Dev.
## Site (Intercept) 0.4886 0.699
## Residual 10.2186 3.197
## Number of obs: 200, groups: Site, 5
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) -0.426993 0.487665 8.840153 -0.876
## Tot_Knocks:Hour_factor3 0.006143 0.007753 184.312421 0.792
## Tot_Knocks:Hour_factor9 0.047108 0.008261 183.994125 5.703
## Tot_Knocks:Hour_factor15 -0.003647 0.011330 181.752132 -0.322
## Tot_Knocks:Hour_factor21 0.007805 0.008871 174.587139 0.880
## Hour_factor3:Num_L_calls 0.030733 0.114684 186.995519 0.268
## Hour_factor9:Num_L_calls -0.131137 0.133233 181.947490 -0.984
## Hour_factor15:Num_L_calls 0.010643 0.118555 186.961890 0.090
## Hour_factor21:Num_L_calls 0.062663 0.040640 186.532925 1.542
## Hour_factor3:Num_Herbivory 0.183577 0.187101 183.595904 0.981
## Hour_factor9:Num_Herbivory -0.264308 0.206499 185.581812 -1.280
## Hour_factor15:Num_Herbivory 0.066389 0.030518 186.943081 2.175
## Hour_factor21:Num_Herbivory -0.077501 0.098284 185.104263 -0.789
## Pr(>|t|)
## (Intercept) 0.4044
## Tot_Knocks:Hour_factor3 0.4291
## Tot_Knocks:Hour_factor9 4.63e-08 ***
## Tot_Knocks:Hour_factor15 0.7479
## Tot_Knocks:Hour_factor21 0.3801
## Hour_factor3:Num_L_calls 0.7890
## Hour_factor9:Num_L_calls 0.3263
## Hour_factor15:Num_L_calls 0.9286
## Hour_factor21:Num_L_calls 0.1248
## Hour_factor3:Num_Herbivory 0.3278
## Hour_factor9:Num_Herbivory 0.2022
## Hour_factor15:Num_Herbivory 0.0309 *
## Hour_factor21:Num_Herbivory 0.4314
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation matrix not shown by default, as p = 13 > 12.
## Use print(x, correlation=TRUE) or
## vcov(x) if you need it
AIC Model selection - removing Site as a random factor so that I can run AIC stepwise
gfitlmto <- lm(SPL_Midrange ~ Tot_Knocks + Num_L_calls + Num_Herbivory + Hour_factor, data = AC.DF1Co)
aicgfitto <- stepAIC(gfitlmto, direction = "backward")
## Start: AIC=502.36
## SPL_Midrange ~ Tot_Knocks + Num_L_calls + Num_Herbivory + Hour_factor
##
## Df Sum of Sq RSS AIC
## - Num_L_calls 1 0.339 2299.1 500.39
## <none> 2298.8 502.36
## - Num_Herbivory 1 32.034 2330.8 503.13
## - Hour_factor 3 123.071 2421.8 506.79
## - Tot_Knocks 1 156.129 2454.9 513.51
##
## Step: AIC=500.39
## SPL_Midrange ~ Tot_Knocks + Num_Herbivory + Hour_factor
##
## Df Sum of Sq RSS AIC
## <none> 2299.1 500.39
## - Num_Herbivory 1 31.726 2330.8 501.13
## - Hour_factor 3 122.865 2422.0 504.80
## - Tot_Knocks 1 161.091 2460.2 511.94
Looking at Snaps and their effect on the HF SPL SPL HF ~ Snaps Distributions look normal so this is a linear model
fit5 <- lm(SPL_HF ~ Snaps, data = AC.DF1)
summary(fit5)
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = AC.DF1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.4772 -2.6200 -0.4764 2.6614 8.3553
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 91.690030 5.741405 15.970 < 2e-16 ***
## Snaps 0.017654 0.003924 4.499 1.16e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.549 on 198 degrees of freedom
## Multiple R-squared: 0.09275, Adjusted R-squared: 0.08817
## F-statistic: 20.24 on 1 and 198 DF, p-value: 1.162e-05
par(mfrow = c(2,2))
plot(fit5)
summary(fit5)$coefficients
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 91.69002981 5.741405123 15.969963 1.943186e-37
## Snaps 0.01765414 0.003923967 4.499054 1.162338e-05
Putting in spectrograms to analyze how the 4 different times sampled look
Note All spectrograms are time along the x axis, frequency along the y axis, frequency is zoomed in to just 0 - 3 kHz
Times progression: 3 AM, 9 AM, 3 PM, 9 PM
Site 5
Site 8
Site 35
Site 32
Site 40